Skip to main content
Version: V4.0

Alarm Management API


Get Alarm Config

Request URL

POST /api/v1.0/invoke/open-ability/method/hotel-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObjectBodyYesCommand parameter

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
low_powerObject<low_power>BodyLow power
sos_alarmObject<sos_alarm>BodySOS alarm
smoke_alarmObject<smoke_alarm>BodySmoke alarm
co_alarmObject<co_alarm>BodyCO alarm
gas_alarmObject<gas_alarm>BodyGas alarm
moist_alarmObject<moist_alarm>BodyMoist alarm
door_open_alarmObject<door_open_alarm>BodyDoor open alarm

low_power description

Parameter NameTypeLocationDescription
recordBooleanBodyWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyWhether the web popup is enable or not?
true: enable
false: disable

sos_alarm description

Parameter NameTypeLocationDescription
recordBooleanBodyWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyWhether the web popup is enable or not?
true: enable
false: disable

smoke_alarm description

Parameter NameTypeLocationDescription
recordBooleanBodyWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyWhether the web popup is enable or not?
true: enable
false: disable

co_alarm description

Parameter NameTypeLocationDescription
recordBooleanBodyWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyWhether the web popup is enable or not?
true: enable
false: disable

gas_alarm description

Parameter NameTypeLocationDescription
recordBooleanBodyWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyWhether the web popup is enable or not?
true: enable
false: disable

moist_alarm description

Parameter NameTypeLocationDescription
recordBooleanBodyWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyWhether the web popup is enable or not?
true: enable
false: disable

door_open_alarm description

Parameter NameTypeLocationDescription
recordBooleanBodyWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyWhether the web popup is enable or not?
true: enable
false: disable
only_check_outBooleanBodyWhether the trigger only when check out or not?
true: yes
false: no
durationStringBodyDuration, now or 30min or 1h or 2h or 6h or 12h or 24h or 48h

Request Example

POST /api/v1.0/invoke/open-ability/method/hotel-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_alarm_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1724816274618,
"result": {
"low_power": {
"record": true,
"web_popup": false
},
"sos_alarm": {
"record": true,
"web_popup": false
},
"smoke_alarm": {
"record": true,
"web_popup": false
},
"co_alarm": {
"record": true,
"web_popup": false
},
"gas_alarm": {
"record": true,
"web_popup": false
},
"moist_alarm": {
"record": true,
"web_popup": false
},
"door_open_alarm": {
"record": true,
"web_popup": false,
"only_check_out": true,
"duration": "now"
}
}
}

Failure Return Example

See Failure Return Example



Update Alarm Config

Request URL

POST /api/v1.0/invoke/open-ability/method/hotel-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
low_powerObject<low_power>BodyYesLow power
sos_alarmObject<sos_alarm>BodyYesSOS alarm
smoke_alarmObject<smoke_alarm>BodyYesSmoke alarm
co_alarmObject<co_alarm>BodyYesCO alarm
gas_alarmObject<gas_alarm>BodyYesGas alarm
moist_alarmObject<moist_alarm>BodyYesMoist alarm
door_open_alarmObject<door_open_alarm>BodyYesDoor open alarm

low_power description

Parameter NameTypeLocationRequiredDescription
recordBooleanBodyYesWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyYesWhether the web popup is enable or not?
true: enable
false: disable

sos_alarm description

Parameter NameTypeLocationRequiredDescription
recordBooleanBodyYesWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyYesWhether the web popup is enable or not?
true: enable
false: disable

smoke_alarm description

Parameter NameTypeLocationRequiredDescription
recordBooleanBodyYesWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyYesWhether the web popup is enable or not?
true: enable
false: disable

co_alarm description

Parameter NameTypeLocationRequiredDescription
recordBooleanBodyYesWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyYesWhether the web popup is enable or not?
true: enable
false: disable

gas_alarm description

Parameter NameTypeLocationRequiredDescription
recordBooleanBodyYesWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyYesWhether the web popup is enable or not?
true: enable
false: disable

moist_alarm description

Parameter NameTypeLocationRequiredDescription
recordBooleanBodyYesWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyYesWhether the web popup is enable or not?
true: enable
false: disable

door_open_alarm description

Parameter NameTypeLocationRequiredDescription
recordBooleanBodyYesWhether the record is enable or not?
true: enable
false: disable
web_popupBooleanBodyYesWhether the web popup is enable or not?
true: enable
false: disable
only_check_outBooleanBodyYesWhether the trigger only when check out or not?
true: yes
false: no
durationStringBodyYesDuration, now or 30min or 1h or 2h or 6h or 12h or 24h or 48h

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/hotel-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_alarm_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"low_power": {
"record": true,
"web_popup": false
},
"sos_alarm": {
"record": true,
"web_popup": false
},
"smoke_alarm": {
"record": true,
"web_popup": false
},
"co_alarm": {
"record": true,
"web_popup": false
},
"gas_alarm": {
"record": true,
"web_popup": false
},
"moist_alarm": {
"record": true,
"web_popup": false
},
"door_open_alarm": {
"record": true,
"web_popup": false,
"only_check_out": true,
"duration": "now"
}
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1724816274618,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Alarm Record List

Request URL

POST /api/v1.0/invoke/open-ability/method/hotel-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
page_sizeIntegerBodyYesPage size
page_indexIntegerBodyYesPage index

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
alarm_timeStringBodyAlarm time, UTC
alarm_typeStringBodyAlarm type, low_power or sos_alarm or smoke_alarm or co_alarm or gas_alarm or moist_alarm or door_open_alarm
residence_idStringBodyResidence ID

Request Example

POST /api/v1.0/invoke/open-ability/method/hotel-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_alarm_record_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"alarm_time": "2025-01-16 15:10:43",
"alarm_type": "smoke_alarm",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
]
}

Failure Return Example

See Failure Return Example